home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / psion / amigancp.lha / AmigaNCP010b / Developer / Include / Libraries / ncplib.h
C/C++ Source or Header  |  1994-11-05  |  3KB  |  109 lines

  1. #ifndef LIBRARIES_NCPLIB_H
  2. #define LIBRARIES_NCPLIB_H
  3.  
  4. /*
  5. **
  6. **  ncp.library
  7. **  -----------
  8. **
  9. */
  10.  
  11. #ifndef EXEC_TYPES_H
  12. #include <exec/types.h>
  13. #endif
  14.  
  15. #define NCP_NAME "amigancp.library"
  16. #define NCP_VERSION 2
  17.  
  18. extern struct Library *NCPBase;
  19.  
  20. /*
  21. ** 'fake' types for intel byte order support 
  22. */
  23. typedef unsigned short IWORD;
  24. typedef unsigned long ILONG;
  25.  
  26. /*
  27. ** Error returns from Read/Write
  28. */
  29.  
  30. #define NCPE_INUSE -1        /* Read/Write already pending */
  31. #define NCPE_ABORTED -2        /* Aborted */
  32. #define NCPE_OFFLINE -3        /* Connection offline */
  33. #define NCPE_INACTIVE -4    /* Channel inactive */
  34. #define NCPE_NOTFOUND -5    /* Remote Process not found */
  35. #define NCPE_RECONNECTED -6 /* Informational warning: Channel has been reconnected */
  36. #define NCPE_NEWUSER -7        /* User process changed! */
  37.  
  38. /*
  39. **    SAS/C Pragmas
  40. */
  41.  
  42. #ifdef __SASC
  43.  
  44. #pragma libcall NCPBase NCP_Rexx 1E 0
  45. #pragma libcall NCPBase NCP_IWORD 24 001
  46. #pragma libcall NCPBase NCP_ILONG 2A 001
  47. #pragma libcall NCPBase NCP_OpenChannel 30 09803
  48. #pragma libcall NCPBase NCP_CloseChannel 36 801
  49. #pragma libcall NCPBase NCP_Read 3C 09803
  50. #pragma libcall NCPBase NCP_BeginRead 42 09803
  51. #pragma libcall NCPBase NCP_CheckRead 48 801
  52. #pragma libcall NCPBase NCP_AbortRead 4E 801
  53. #pragma libcall NCPBase NCP_WaitRead 54 801
  54. #pragma libcall NCPBase NCP_Write 5A 09803
  55. #pragma libcall NCPBase NCP_BeginWrite 60 09803
  56. #pragma libcall NCPBase NCP_CheckWrite 66 801
  57. #pragma libcall NCPBase NCP_AbortWrite 6C 801
  58. #pragma libcall NCPBase NCP_WaitWrite 72 801
  59. #pragma libcall NCPBase NCP_IWORDP 78 9802
  60. #pragma libcall NCPBase NCP_ILONGP 7E 9802
  61. #pragma libcall NCPBase NCP_IWORDPI 84 801
  62. #pragma libcall NCPBase NCP_ILONGPI 8A 801
  63. #pragma libcall NCPBase NCP_private1 90 A01
  64. #pragma libcall NCPBase NCP_ReadSig 96 801
  65. #pragma libcall NCPBase NCP_WriteSig 9c 801
  66. #pragma libcall NCPBase NCP_ibm2iso ae 001
  67. #pragma libcall NCPBase NCP_iso2ibm b4 001
  68. #pragma libcall NCPBase NCP_clnl ba 801
  69. #pragma libcall NCPBase NCP_Fault c0 198004
  70. #pragma libcall NCPBase NCP_LinkRemoteRun c6 09803
  71.  
  72. #endif
  73.  
  74. /*
  75. **    ANSI Prototypes
  76. */
  77.  
  78. #ifndef NO_PROTOS
  79.  
  80. IWORD NCP_IWORD( IWORD inval );
  81. ILONG NCP_ILONG( ILONG inval );
  82. APTR NCP_OpenChannel( STRPTR localname, STRPTR remotename, ULONG flags );
  83. VOID NCP_CloseChannel( APTR ncpchannel );
  84. LONG NCP_Read( APTR ncpchannel, APTR buffer, LONG len );
  85. LONG NCP_BeginRead( APTR ncpchannel, APTR buffer, LONG len );
  86. LONG NCP_CheckRead( APTR ncpchannel );
  87. LONG NCP_WaitRead( APTR ncpchannel );
  88. LONG NCP_AbortRead( APTR ncpchannel );
  89. LONG NCP_Write( APTR ncpchannel, APTR buffer, LONG len );
  90. LONG NCP_BeginWrite( APTR ncpchannel, APTR buffer, LONG len );
  91. LONG NCP_CheckWrite( APTR ncpchannel );
  92. LONG NCP_WaitWrite( APTR ncpchannel );
  93. LONG NCP_AbortWrite( APTR ncpchannel );
  94. IWORD NCP_IWORDP( APTR from, APTR to );
  95. ILONG NCP_ILONGP( APTR from, APTR to );
  96. IWORD NCP_IWORDPI( APTR from );
  97. ILONG NCP_ILONGPI( APTR from );
  98. ULONG NCP_ReadSig( APTR ncpchannel );
  99. ULONG NCP_WriteSig( APTR ncpchannel );
  100. UBYTE NCP_iso2ibm( UBYTE isoch );
  101. UBYTE NCP_ibm2iso( UBYTE ibmch );
  102. void NCP_clnl( STRPTR string );
  103. void NCP_Fault( LONG code, STRPTR header, STRPTR buffer, LONG buffersize );
  104. LONG NCP_LinkRemoteRun( STRPTR remotefilename, STRPTR cmdline, ULONG cmdlinelen );
  105.  
  106. #endif
  107.  
  108. #endif
  109.